


import com.itheima.dao.PermissionDao;
import com.itheima.domain.Permission;
import com.itheima.util.MyBatisUtils;
import org.apache.ibatis.session.SqlSession;
import org.junit.Test;

import java.util.List;

public class test {
   @Test
    public void method() {

       /* SqlSession sqlSession = MyBatisUtils.openSession();
        UserDao mapper = sqlSession.getMapper(UserDao.class);
        List<User> all = mapper.findList();
        System.out.println(all);
*/
      /*  UserServiceImpl userService = new UserServiceImpl();
        List<User> all = userService.findAll();
        System.out.println(all);*/
        SqlSession sqlSession = MyBatisUtils.openSession();
        PermissionDao mapper = sqlSession.getMapper(PermissionDao.class);
        List<Permission> permissions = mapper.selectByRid(1);
        System.out.println(permissions);


    }
}
